<!--
  -    Copyright (c) 2018-2025, hycloud All rights reserved.
  -
  - Redistribution and use in source and binary forms, with or without
  - modification, are permitted provided that the following conditions are met:
  -
  - Redistributions of source code must retain the above copyright notice,
  - this list of conditions and the following disclaimer.
  - Redistributions in binary form must reproduce the above copyright
  - notice, this list of conditions and the following disclaimer in the
  - documentation and/or other materials provided with the distribution.
  - Neither the name of the pig4cloud.com developer nor the names of its
  - contributors may be used to endorse or promote products derived from
  - this software without specific prior written permission.
  - Author: hycloud
  -->

  <template>
    <div class="app-container calendar-list-container">
      <basic-container>
        <avue-crud
          ref="crud"
          :option="tableOption"
          :data="list"
          :permission="permissionList"
          :page.sync="page"
          v-model="form"
          :table-loading="listLoading"
          :before-open="handleOpenBefore"
          @on-load="getList"
          @search-change="searchChange"
          @refresh-change="refreshChange"
          @size-change="sizeChange"
          @current-change="currentChange"
          @row-update="update"
          @row-save="create">
          <template slot="menuLeft">
              <el-button
              icon="el-icon-circle-plus"
              size="small"
              type="primary"
              @click="addNodeform('special_equipment_bill')">申请</el-button>
          </template>        
        </avue-crud>
      </basic-container>
      <el-dialog
            :visible.sync="modal"
            v-if="modal"
            title=""
            width="1200px"
            top="0"
            class="flow-dialog"
            :close-on-click-modal="false"
            append-to-body>
            <div class="form-designer">
                <render-form
                   :option="option" :formObj="formObj" @getModal="getModal"
                ></render-form>
            </div>
        </el-dialog>
    </div>
  </template>
  
  <script>
  import { tableOption } from '@/const/crud/applyfor/special_equipment'
  import RenderForm from '@/components/table-design/newRender'
  import ViewForm from '@/components/table-design/viewRender'
  import addView from '@/mixins/addView'
  import {mapGetters} from 'vuex'
  
  export default {
    components: { RenderForm, ViewForm },
    mixins: [addView],
    name: 'special_equipment',
    data() {
      return {
        searchForm: {},
                tableData: [],
                formObj: {
                    code: 'special_equipment',
                    title: '',
                    attachment: '',
                    flag: 'start',
                    bizData: {}
                },
                dataobj: {},
                option: {},
                option1: {},
                modal: false,
                modal1: false,
                page: {
                    total: 0, // 总页数
                    currentPage: 1, // 当前页数
                    pageSize: 20 // 每页显示多少条
                },
                tableLoading: false,
                tableOption: tableOption,
                list: [
                  {
                    title: '机关服务中心：姚龙怀的施工申请 2023年04月07日',
                    applicant: '管理员',
                    ApplicationDepartment: '机关服务中心',
                    contactInformation: '17545681223',
                    RoomNo: '888',
                    ApplicationType: '测试',
                    DeviceType: '电脑',
                    reasonCancellation: '借宿',
                    handledBy: '局领导',
                    auditStatus: '审批中',
                    time: '2023-04-07',
                  }
                ]
      }
    },
    computed: {
            ...mapGetters(['permissions', 'tagList']),
            permissionList() {
                return {
                    addBtn: false,
                    delBtn: true,
                    editBtn: true
                };
            }
        },
    created() {
      
    },
    
    methods: {
    }
  }
  </script>